#!/bin/bash 
#set -x

repo=""
for arg in `echo $*|awk '{print $0}'`
do 
	if [[ $arg == --repo* ]];
	then
		repo=`echo $arg|awk -F '=' '{print $2}'`
	fi
done

if [[ -z $repo ]]; then
	echo "must pass --repo arg"
	exit 1
fi

java -jar ./blockj-miner/target/blockj-miner-2.0.0.jar --spring.config.location=file:$repo/node.properties $*
